﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Cliente.aspx.cs" Inherits="Cliente" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Administrar Clientes</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <script type="text/javascript" src="CSS/script.js"></script>

        <link rel="stylesheet" href="CSS/style.css" type="text/css" media="screen" />
        <!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
        <!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]-->
    </head>
<body>
    <form id="form1" runat="server">
    <div id="art-page-background-glare">
        <div id="art-page-background-glare-image"></div>
    </div>
    <div id="art-main">
        <div class="art-Sheet">
            <div class="art-Sheet-tl"></div>
            <div class="art-Sheet-tr"></div>
            <div class="art-Sheet-bl"></div>
            <div class="art-Sheet-br"></div>
            <div class="art-Sheet-tc"></div>
            <div class="art-Sheet-bc"></div>
            <div class="art-Sheet-cl"></div>
            <div class="art-Sheet-cr"></div>
            <div class="art-Sheet-cc"></div>
            <div class="art-Sheet-body">
                <div class="art-Header">
                    <div class="art-Header-png"></div>
                    <div class="art-Header-jpeg"></div>
                    <div class="art-Logo">
                        <h1 id="name-text" class="art-Logo-name"><a href="#">SAIC</a></h1>
                        <div id="slogan-text" class="art-Logo-text">Sistema de administración de inventario</div>
                    </div>
                </div>
                <div class="art-nav">
                	<div class="l"></div>
                	<div class="r"></div>
                	<ul class="art-menu">
                		<li>
                			<a href="#" class=" active"><span class="l"></span><span class="r"></span><span class="t">Home</span></a>
                		</li>
                		<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">Menu Item</span></a>
                			<ul>
                				<li><a href="#">Menu Subitem 1</a>
                					<ul>
                						<li><a href="#">Menu Subitem 1.1</a></li>
                						<li><a href="#">Menu Subitem 1.2</a></li>
                						<li><a href="#">Menu Subitem 1.3</a></li>
                					</ul>
                				</li>
                				<li><a href="#">Menu Subitem 2</a></li>
                				<li><a href="#">Menu Subitem 3</a></li>
                			</ul>
                		</li>		
                		<li>
                			<a href="#"><span class="l"></span><span class="r"></span><span class="t">About</span></a>
                		</li>
                	</ul>
                </div>
                <div class="art-contentLayout">
                    <div class="art-content">
                        <div class="art-Post">
                            <div class="art-Post-tl"></div>
                            <div class="art-Post-tr"></div>
                            <div class="art-Post-bl"></div>
                            <div class="art-Post-br"></div>
                            <div class="art-Post-tc"></div>
                            <div class="art-Post-bc">
                                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                            </div>
                            <div class="art-Post-cl"></div>
                            <div class="art-Post-cr"></div>
                            <div class="art-Post-cc"></div>
                            <div class="art-Post-body">
                        <div class="art-Post-inner">
                                        <h2 class="art-PostHeader">
                                            Administrar clientes
                                        </h2>
                                        <div class="art-PostContent">
                                            <br />
                                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                                                <asp:ListItem Value="1">Consultar Cliente</asp:ListItem>
                                                <asp:ListItem Value="0">Agregar Cliente</asp:ListItem>
                                                <asp:ListItem Value="2">Modificar Cliente</asp:ListItem>
                                                <asp:ListItem Value="3">Eliminar Cliente</asp:ListItem>
                                            </asp:DropDownList>
                                            <br />
                                            <br />
                                            <br />
                                            <asp:MultiView ID="MultiView1"  runat="server" ActiveViewIndex="1">
                                            <asp:View ID="View1" runat="server">
                                                <asp:Label ID="Label8" runat="server" Text="Rut Cliente" Width="110px"></asp:Label>
                                                <asp:TextBox ID="TextBoxRutAgregar" runat="server"></asp:TextBox>&nbsp;-
                                                <asp:TextBox ID="TextBoxDigitoVerificadorAgregar" runat="server" Width="20px"></asp:TextBox>
                                                <br />
                    <br />
                    <asp:Label ID="Label9" runat="server" Text="Nombre" Width="110px"></asp:Label>
                                                <asp:TextBox ID="TextBoxNobreAgregar" runat="server" Width="283px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label10" runat="server" Text="Direccion" Width="110px"></asp:Label>
                                                <asp:TextBox ID="TextBoxDireccionAgregar" runat="server" Width="283px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label11" runat="server" Text="Telefono" Width="110px"></asp:Label>
                                                <asp:TextBox ID="TextBoxTelefonoAgregar" runat="server" Width="283px"></asp:TextBox>
                                                <br />
                                                &nbsp;&nbsp;<br />
                    <br />
                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="ButtonAgregarCliente" runat="server" Text="Agregar" 
                        Width="65px" onclick="ButtonAgregarCliente_Click" />
                                                <br />
                                                <br />
                                                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                                    AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" 
                                                    BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="RUT" 
                                                    DataSourceID="ObjectDataSource1" ForeColor="Black" GridLines="Vertical">
                                                    <RowStyle BackColor="#F7F7DE" />
                                                    <Columns>
                                                        <asp:BoundField DataField="RUT" HeaderText="RUT" ReadOnly="True" 
                                                            SortExpression="RUT" />
                                                        <asp:BoundField DataField="NOMBRE" HeaderText="NOMBRE" 
                                                            SortExpression="NOMBRE" />
                                                        <asp:BoundField DataField="DIRECCION" HeaderText="DIRECCION" 
                                                            SortExpression="DIRECCION" />
                                                        <asp:BoundField DataField="TELEFONO" HeaderText="TELEFONO" 
                                                            SortExpression="TELEFONO" />
                                                    </Columns>
                                                    <FooterStyle BackColor="#CCCC99" />
                                                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                                                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                                    <AlternatingRowStyle BackColor="White" />
                                                </asp:GridView>
                                                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                                    DeleteMethod="DeleteCliente" InsertMethod="InsertCliente" 
                                                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetClientes" 
                                                    TypeName="ClienteBLL" UpdateMethod="UpdateCliente">
                                                    <DeleteParameters>
                                                        <asp:Parameter Name="rut" Type="String" />
                                                    </DeleteParameters>
                                                    <UpdateParameters>
                                                        <asp:Parameter Name="rut" Type="String" />
                                                        <asp:Parameter Name="nom" Type="String" />
                                                        <asp:Parameter Name="dir" Type="String" />
                                                        <asp:Parameter Name="telefono" Type="String" />
                                                    </UpdateParameters>
                                                    <InsertParameters>
                                                        <asp:Parameter Name="rut" Type="String" />
                                                        <asp:Parameter Name="nom" Type="String" />
                                                        <asp:Parameter Name="dir" Type="String" />
                                                        <asp:Parameter Name="telefono" Type="String" />
                                                    </InsertParameters>
                                                </asp:ObjectDataSource>
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <asp:Label ID="Label13" runat="server" Text="Buscar por rut" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TextBoxRutBuscar" runat="server" ></asp:TextBox>
                    &nbsp;-&nbsp;<asp:TextBox ID="TextBoxDigitoVerificadorBuscar" runat="server" 
                        Width="20px"></asp:TextBox>
                    &nbsp;
                    <asp:Button ID="ButtonBuscarClienteRut" runat="server" 
                        onclick="ButtonBuscarClienteRut_Click" Text="Buscar" Width="65px" />
                    <br />
                    <br />
                    <asp:Label ID="Label29" runat="server" Text="Buscar por nombre"></asp:Label>
                    &nbsp;&nbsp;<asp:TextBox ID="TextBoxBuscarPorNombre" runat="server" Width="278px"></asp:TextBox>
                    &nbsp;&nbsp;<asp:Button ID="ButtonBuscarClienteNombre" runat="server" 
                        onclick="ButtonBuscarClienteNombre_Click" Text="Buscar" Width="65px" />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="Label22" runat="server" Text="Rut Cliente" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TextBoxRutBuscarDato" runat="server" ></asp:TextBox>
                    &nbsp;-&nbsp;<asp:TextBox ID="TextBoxDigitoVerificadorBuscarDato" runat="server" 
                        Width="20px"></asp:TextBox>
&nbsp;<br />
                    <br />
                    <asp:Label ID="Label23" runat="server" Text="Nombre" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="NombreBuscarCliente" runat="server" Enabled="False" 
                        Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label24" runat="server" Text="Direccion" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="DirBuscarCliente" runat="server" Enabled="False" 
                        Width="281px" ></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label25" runat="server" Text="Telefono" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TelBuscarCliente" runat="server" Enabled="False" 
                        Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <br />
                    &nbsp;&nbsp;<asp:GridView ID="GridViewBuscar" runat="server" BackColor="White" 
                        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        ForeColor="Black" GridLines="Vertical" AllowPaging="True" PageSize="20">
                        <RowStyle BackColor="#F7F7DE" />
                        <FooterStyle BackColor="#CCCC99" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <br /> <br />
                </asp:View>
                <asp:View ID="View3" runat="server">
                    <asp:Label ID="Label30" runat="server" Text="Buscar por rut" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TextBoxRutBuscarModificar" runat="server"></asp:TextBox>
                    &nbsp;-&nbsp;<asp:TextBox ID="TextBoxDigitoVerificadorBuscarModificar" runat="server" 
                        Width="20px"></asp:TextBox>
                    &nbsp;
                    <asp:Button ID="ButtonBuscarClienteRutModificar" runat="server" 
                        Text="Buscar" Width="65px" 
                        onclick="ButtonBuscarClienteRutModificar_Click"/>
                    <br />
                    <br />
                    <asp:Label ID="Label31" runat="server" Text="Buscar por nombre"></asp:Label>
                    &nbsp;&nbsp;<asp:TextBox ID="TextBoxBuscarPorNombreModificar" runat="server" 
                        Width="278px"></asp:TextBox>
                    &nbsp;&nbsp;<asp:Button ID="ButtonBuscarClienteNombre0" runat="server" 
                         Text="Buscar" Width="65px" onclick="ButtonBuscarClienteNombre0_Click" />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="Label3" runat="server" Text="Rut Cliente" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="RutModificarCliente" runat="server" Enabled="False"></asp:TextBox>
                    &nbsp;-
                    <asp:TextBox ID="DigVerModificarCliente" runat="server" Enabled="False" 
                        Width="20px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label4" runat="server" Text="Nombre" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="NombreModificarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label5" runat="server" Text="Direccion" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="DirModificarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label6" runat="server" Text="Telefono" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TelModificarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="ButtonModificarCliente" runat="server" Text="Modificar" 
                        Width="65px" onclick="ButtonModificarCliente_Click"/>
                    <br />
                    <br />
                    <br />
                    <asp:GridView ID="GridViewModificar" runat="server" BackColor="White" 
                        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        ForeColor="Black" GridLines="Vertical" AllowPaging="True" 
                        AutoGenerateSelectButton="True" PageSize="20" 
                        onselectedindexchanged="GridViewModificar_SelectedIndexChanged">
                        <RowStyle BackColor="#F7F7DE" />
                        <FooterStyle BackColor="#CCCC99" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <br />
                    <br />
                </asp:View>
                <asp:View ID="View4" runat="server">
                    <asp:Label ID="Label32" runat="server" Text="Buscar por rut" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TextBoxRutBuscarEliminar" runat="server"></asp:TextBox>
                    &nbsp;-&nbsp;<asp:TextBox ID="TextBoxDigitoVerificadorBuscarEliminar" runat="server" 
                        Width="20px"></asp:TextBox>
                    &nbsp;
                    <asp:Button ID="ButtonBuscarClienteRutEliminar" runat="server" Text="Buscar" 
                        Width="65px" onclick="ButtonBuscarClienteRutEliminar_Click" />
                    <br />
                    <br />
                    <asp:Label ID="Label33" runat="server" Text="Buscar por nombre"></asp:Label>
                    &nbsp;&nbsp;<asp:TextBox ID="TextBoxBuscarPorNombreEliminar" runat="server" Width="278px"></asp:TextBox>
                    &nbsp;&nbsp;<asp:Button ID="ButtonBuscarClienteNombreEliminar" runat="server" 
                        onclick="ButtonBuscarClienteNombreEliminar_Click" Text="Buscar" Width="65px" />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="Label34" runat="server" Text="Rut Cliente" Width="110px"></asp:Label>
&nbsp;<asp:TextBox ID="RutEliminarCliente" runat="server" Enabled="False"></asp:TextBox>
                    &nbsp;-
                    <asp:TextBox ID="DigVerEliminarCliente" runat="server" Enabled="False" Width="20px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label35" runat="server" Text="Nombre" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="NombreEliminarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label36" runat="server" Text="Direccion" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="DirEliminarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Label ID="Label37" runat="server" Text="Telefono" Width="110px"></asp:Label>
                    &nbsp;<asp:TextBox ID="TelEliminarCliente" runat="server" Width="281px"></asp:TextBox>
                    <br />
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="ButtonEliminarCliente" runat="server" Text="Eliminar" 
                        Width="65px" onclick="ButtonEliminarCliente_Click" />
                    <br />
                    <br />
                    <asp:GridView ID="GridViewEliminar" runat="server" AllowPaging="True" 
                        AutoGenerateSelectButton="True" BackColor="White" BorderColor="#DEDFDE" 
                        BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
                        GridLines="Vertical" 
                        onselectedindexchanged="GridViewEliminar_SelectedIndexChanged" 
                        PageSize="20">
                        <RowStyle BackColor="#F7F7DE" />
                        <FooterStyle BackColor="#CCCC99" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <br />
                </asp:View>
            </asp:MultiView>

    
                                            
                                            
                                            
                                            
                                                
                                        </div>
                                        <div class="cleared"></div>
                        </div>
                        
                        		<div class="cleared"></div>
                            </div>
                        </div>
                        
                    </div>
                </div>
                <div class="cleared"></div><div class="art-Footer">
                    <div class="art-Footer-inner">
                        <a href="#" class="art-rss-tag-icon" title="RSS"></a>
                        <div class="art-Footer-text">
                            <p><a href="#">Contact UsTrademarks Copyright &copy; 2009 ---. All Rights Reserved.</a></p>
                        </div>
                    </div>
                    <div class="art-Footer-background"></div>
                </div>
        		<div class="cleared"></div>
            </div>
        </div>
        <div class="cleared"></div>
        <p class="art-page-footer"><a href="http://www.artisteer.com/">Web Template</a> created with Artisteer.</p>
    </div>
    
    </form>
    
</body>


</html>
